home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '87 / Source ƒ.sea / Source ƒ / emacs source ƒ / EDEF.H < prev    next >
Encoding:
Text File  |  1992-06-28  |  7.1 KB  |  151 lines  |  [TEXT/MARC]

  1. /*    EDEF:        Global variable definitions for
  2.             MicroEMACS 3.2
  3.  
  4.             written by Dave G. Conroy
  5.             modified by Steve Wilhite, George Jones
  6.             greatly modified by Daniel Lawrence
  7. */
  8.  
  9. /* some global fuction declarations */
  10.  
  11. char *malloc();
  12.  
  13. #ifdef    maindef
  14.  
  15. /* for MAIN.C */
  16.  
  17. /* initialized global definitions */
  18.  
  19. int     fillcol = 72;                   /* Current fill column          */
  20. short   kbdm[NKBDM] = {CTLX|')'};       /* Macro                        */
  21. char    pat[NPAT];                      /* Search pattern        */
  22. char    rpat[NPAT];            /* replacement pattern        */
  23. char    sarg[NSTRING] = "";        /* string argument for line exec*/
  24. int    eolexist = TRUE;        /* does clear to EOL exist    */
  25. int    revexist = FALSE;        /* does reverse video exist?    */
  26. char    *modename[] = {            /* name of modes        */
  27.     "WRAP", "CMODE", "SPELL", "EXACT", "VIEW", "OVER", "MAGIC", "CRYPT"};
  28. char    modecode[] = "WCSEVOMY";    /* letters to represent modes    */
  29. int    gmode = 0;            /* global editor mode        */
  30. int    gfcolor = 7;            /* global forgrnd color (white)    */
  31. int    gbcolor    = 0;            /* global backgrnd color (black)*/
  32. int     sgarbf  = TRUE;                 /* TRUE if screen is garbage    */
  33. int     mpresf  = FALSE;                /* TRUE if message in last line */
  34. int    clexec    = FALSE;        /* command line execution flag    */
  35. int    mstore    = FALSE;        /* storing text to macro flag    */
  36. struct    BUFFER *bstore = NULL;        /* buffer to store macro text to*/
  37. int     vtrow   = 0;                    /* Row location of SW cursor */
  38. int     vtcol   = 0;                    /* Column location of SW cursor */
  39. int     ttrow   = HUGE;                 /* Row location of HW cursor */
  40. int     ttcol   = HUGE;                 /* Column location of HW cursor */
  41. int    lbound    = 0;            /* leftmost column of current line
  42.                        being displayed */
  43. int    metac = CTRL | '[';        /* current meta character */
  44. int    ctlxc = CTRL | 'X';        /* current control X prefix char */
  45. int    reptc = CTRL | 'U';        /* current universal repeat char */
  46. int    abortc = CTRL | 'G';        /* current abort command char    */
  47.  
  48. int    quotec = 0x11;            /* quote char during mlreply() */
  49. char    *cname[] = {            /* names of colors        */
  50.     "BLACK", "RED", "GREEN", "YELLOW", "BLUE",
  51.     "MAGENTA", "CYAN", "WHITE"};
  52. int    lflick = 99;            /* lines displayed since VT RET    */
  53. KILL *kbufp  = NULL;        /* current kill buffer chunk pointer    */
  54. KILL *kbufh  = NULL;        /* kill buffer header pointer        */
  55. int kused = KBLOCK;        /* # of bytes used in kill buffer    */
  56. WINDOW *swindow = NULL;        /* saved window pointer            */
  57. int cryptflag = FALSE;        /* currently encrypting?        */
  58.  
  59. /* uninitialized global definitions */
  60.  
  61. int     currow;                 /* Cursor row                   */
  62. int     curcol;                 /* Cursor column                */
  63. int     thisflag;               /* Flags, this command          */
  64. int     lastflag;               /* Flags, last command          */
  65. int     curgoal;                /* Goal for C-P, C-N            */
  66. WINDOW  *curwp;                 /* Current window               */
  67. BUFFER  *curbp;                 /* Current buffer               */
  68. WINDOW  *wheadp;                /* Head of list of windows      */
  69. BUFFER  *bheadp;                /* Head of list of buffers      */
  70. BUFFER  *blistp;                /* Buffer for C-X C-B           */
  71. short   *kbdmip;                /* Input pointer for above      */
  72. short   *kbdmop;                /* Output pointer for above     */
  73.  
  74. BUFFER  *bfind();               /* Lookup a buffer by name      */
  75. WINDOW  *wpopup();              /* Pop up window creation       */
  76. LINE    *lalloc();              /* Allocate a line              */
  77.  
  78. #else
  79.  
  80. /* for all the other .C files */
  81.  
  82. /* initialized global external declarations */
  83.  
  84. extern  int     fillcol;                /* Fill column                  */
  85. extern  short   kbdm[];                 /* Holds kayboard macro data    */
  86. extern  char    pat[];                  /* Search pattern               */
  87. extern    char    rpat[];            /* Replacement pattern        */
  88. extern    char    sarg[];            /* string argument for line exec*/
  89. extern    int    eolexist;        /* does clear to EOL exist?    */
  90. extern    int    revexist;        /* does reverse video exist?    */
  91. extern    char *modename[];        /* text names of modes        */
  92. extern    char    modecode[];        /* letters to represent modes    */
  93. extern    KEYTAB keytab[];        /* key bind to functions table    */
  94. extern    NBIND names[];            /* name to function table    */
  95. extern    int    gmode;            /* global editor mode        */
  96. extern    int    gfcolor;        /* global forgrnd color (white)    */
  97. extern    int    gbcolor;        /* global backgrnd color (black)*/
  98. extern  int     sgarbf;                 /* State of screen unknown      */
  99. extern  int     mpresf;                 /* Stuff in message line        */
  100. extern    int    clexec;            /* command line execution flag    */
  101. extern    int    mstore;            /* storing text to macro flag    */
  102. extern    struct    BUFFER *bstore;        /* buffer to store macro text to*/
  103. extern    int     vtrow;                  /* Row location of SW cursor */
  104. extern    int     vtcol;                  /* Column location of SW cursor */
  105. extern    int     ttrow;                  /* Row location of HW cursor */
  106. extern    int     ttcol;                  /* Column location of HW cursor */
  107. extern    int    lbound;            /* leftmost column of current line
  108.                        being displayed */
  109. extern    int    metac;            /* current meta character */
  110. extern    int    ctlxc;            /* current control X prefix char */
  111. extern    int    reptc;            /* current universal repeat char */
  112. extern    int    abortc;            /* current abort command char    */
  113.  
  114. extern    int    quotec;            /* quote char during mlreply() */
  115. extern    char    *cname[];        /* names of colors        */
  116. extern    int    lflick;            /* lines displayed since VT RET    */
  117. extern KILL *kbufp;            /* current kill buffer chunk pointer */
  118. extern KILL *kbufh;            /* kill buffer header pointer    */
  119. extern int kused;            /* # of bytes used in KB        */
  120. extern WINDOW *swindow;            /* saved window pointer        */
  121. extern int cryptflag;            /* currently encrypting?    */
  122.  
  123. /* initialized global external declarations */
  124.  
  125. extern  int     currow;                 /* Cursor row                   */
  126. extern  int     curcol;                 /* Cursor column                */
  127. extern  int     thisflag;               /* Flags, this command          */
  128. extern  int     lastflag;               /* Flags, last command          */
  129. extern  int     curgoal;                /* Goal for C-P, C-N            */
  130. extern  WINDOW  *curwp;                 /* Current window               */
  131. extern  BUFFER  *curbp;                 /* Current buffer               */
  132. extern  WINDOW  *wheadp;                /* Head of list of windows      */
  133. extern  BUFFER  *bheadp;                /* Head of list of buffers      */
  134. extern  BUFFER  *blistp;                /* Buffer for C-X C-B           */
  135. extern  short   *kbdmip;                /* Input pointer for above      */
  136. extern  short   *kbdmop;                /* Output pointer for above     */
  137.  
  138. extern  BUFFER  *bfind();               /* Lookup a buffer by name      */
  139. extern  WINDOW  *wpopup();              /* Pop up window creation       */
  140. extern  LINE    *lalloc();              /* Allocate a line              */
  141.  
  142. #endif
  143.  
  144. /* terminal table defined only in TERM.C */
  145.  
  146. #ifndef    termdef
  147. extern  TERM    term;                   /* Terminal information.        */
  148. #endif
  149.  
  150.  
  151.